package com.lemon.exam.common.properties;

import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * knife4j页面展示信息配置
 *
 * @author Lemon
 * @since 2025/3/13 11:20
 */
@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "knife4j.open-api")
public class Knife4jOpenApiProperties {
    private String title;
    private String version;
    private String description;
    private Contact contact;

    public Info getInfo() {
        return new Info()
                .title(title)
                .version(version)
                .description(description)
                .contact(contact);
    }
}
